package com.hgxd.entity.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 从机列表
 * </p>
 *
 * @author fsd
 * @since 2023-10-18
 */
@Getter
@Setter
@TableName("rb_slave")
@ApiModel(value = "Slave对象", description = "从机列表")
public class Slave implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("从机ID")
      @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty("从机名称")
    private String name;

    @ApiModelProperty("所属设备id")
    private Integer equipmentId;

    @ApiModelProperty("所属设备名称")
    private String equipmentName;

    @ApiModelProperty("创建时间")
    @JsonFormat(shape=JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime creatTime;

    @ApiModelProperty("修改时间")
    @JsonFormat(shape=JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;

    @ApiModelProperty("备注/描述")
    private String comment;

    @ApiModelProperty("柜号")
    private String cntrNo;

    @ApiModelProperty("串口序号")
    private Integer ckNumber;

    @ApiModelProperty("从机地址")
    private String slaveAddress;

    @ApiModelProperty("协议和产品：id")
    private Integer agreementsProductsId;

    @ApiModelProperty("协议和产品：名称")
    private String agreementsProductsName;

    @ApiModelProperty("寄存器地址")
    private String jcqAddress;

    @ApiModelProperty("电表品牌id")
    private Integer eleBrandId;

    @ApiModelProperty("电表品牌名称")
    private String eleBrandName;

    @ApiModelProperty("电表品牌拼音")
    private String eleBrandPyName;

    @ApiModelProperty("所属组织id")
    private Integer organizationId;

    @ApiModelProperty("所属组织名称")
    private String organizationName;

    @ApiModelProperty("仪表在线状态：0不在线，1在线")
    private Integer status;

    @ApiModelProperty("最后一次采集时间")
    @JsonFormat(shape=JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime endTime;

    @ApiModelProperty("是否删除：0未删除，1已删除")
    @TableLogic
    private String isdelete;


}
